package backend

import "github.com/gogf/gf/v2/frame/g"

type MenuIndexReq struct {
	g.Meta `path:"/menu/index" method:"get" summary:"菜单列表页面" tags:"菜单"`
}

type MenuIndexRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type MenuIndexListReq struct {
	g.Meta     `path:"/menu/list" method:"get" summary:"菜单列表数据" tags:"菜单"`
	Title      string `json:"title"`
	Permission string `json:"permission"`
	Status     int    `json:"status"`
	CommonPaginationReq
}

type MenuIndexListRes struct {
	Data interface{} `json:"data"`
	CommonPaginationRes
}

type MenuShowCreateReq struct {
	g.Meta `path:"/menu/create" method:"get" summary:"菜单创建页面" tags:"菜单"`
}

type MenuShowCreateRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type MenuCreateReq struct {
	g.Meta     `path:"/menu/create" method:"post" summary:"菜单创建" tags:"菜单"`
	Pid        uint   `json:"pid"`
	Title      string `json:"title"`
	Permission string `json:"permission"`
	Icon       string `json:"icon"`
	Method     string `json:"method"`
	Path       string `json:"path"`
	Type       int    `json:"type"`
	IsHide     int    `json:"is_hide"`
	Sort       int    `json:"sort"`
	Status     int    `json:"status"`
}

type MenuCreateRes struct {
	MenuId uint
}

type MenuShowUpdateReq struct {
	g.Meta `path:"/menu/update/{Id}" method:"get" summary:"菜单创建页面" tags:"菜单"`
	Id     uint `json:"id"`
}

type MenuShowUpdateRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type MenuUpdateReq struct {
	g.Meta     `path:"/menu/update/{Id}" method:"post" summary:"菜单修改" tags:"菜单"`
	Id         uint   `json:"id"      v:"min:1#请选择需要修改的菜单" dc:"菜单Id"`
	Pid        uint   `json:"pid"`
	Title      string `json:"title"`
	Permission string `json:"permission"`
	Icon       string `json:"icon"`
	Method     string `json:"method"`
	Path       string `json:"path"`
	Type       int    `json:"type"`
	IsHide     int    `json:"is_hide"`
	Sort       int    `json:"sort"`
	Status     int    `json:"status"`
}

type MenuUpdateRes struct{}
